<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <form action="">
    <input type="checkbox" id="all">全选
    <ul>
      <li><input type="checkbox">张三</li>
      <li><input type="checkbox">李四</li>
      <li><input type="checkbox">麻子</li>
    </ul>
  </form>

  <script>
    const ipt = document.getElementById('all')
    console.log(ipt);
    const list = document.querySelector('ul')
    console.log(list);
    ipt.addEventListener('click', function () {
      
    })
  </script>
</body>

</html>